package de.unibi.mmi.homeauto.team1.constants;

public class MORE {
	public static final int BELL_ID = 100;
	public static final int TELEPHONE_ID = 101;
	public static final int MESSAGES_ID = 102;
	public static final int OUTSIDE_TEMP_ID = 500;

	public static final int[] IDS = { MORE.BELL_ID, MORE.TELEPHONE_ID,
			MORE.MESSAGES_ID, MORE.OUTSIDE_TEMP_ID };

	private static final float[] values = new float[4];

	public static final void setValue(int id, float value) {
		if (id == OUTSIDE_TEMP_ID) {
			values[3] = value;
		} else {
			values[id - 100] = value;
		}
	}

	public static final float getValue(int id) {
		if (id == BELL_ID || id == TELEPHONE_ID || id == MESSAGES_ID
				|| id == OUTSIDE_TEMP_ID) {
			if (id == MORE.OUTSIDE_TEMP_ID) {
				return values[3];
			} else {
				return values[id - 100];
			}
		} else {
			return -1;
		}
	}
}
